import http from '../utils/http'
import * as types from './mutations-type'

export default {
    //banner
    [types.GET_BANNER_LIST]({}) {
        return new Promise((resolve, reject) => {
            http.post('/banner.lists').then((res) => {
                return resolve(res.data);
            });
        });
    },
    //获取公告
    [types.GET_AD_LIST]({}) {
        return new Promise((resolve, reject) => {
            http.post('/notice.lists').then((res) => {
                return resolve(res.data);
            });
        });
    },

    //获取短信验证码
    [types.GET_PHONE_CODE]({}, content) {
        return new Promise((resolve, reject) => {
            http.post('/get_phone_code', content).then((res) => {
                return resolve(res.data);
            });
        });
    },
    //获取充值提示信息
    [types.RECHARGE_INFO]({}) {
        return new Promise((resolve) => {
            http.post('/get_recharge_info').then((res) => {
                return resolve(res.data);
            });
        });
    },
};